import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/index'
import Registration from '../views/Registration'
import certificate from '../views/certificate'
import Equipment from  '../views/Equipment'
import CallDetails from '../components/equipment/CallDetails'
import List from '../components/equipment/List'

Vue.use(VueRouter);

const routers = [
    {
        path:'/',
        redirect: '/Registration',
        component:index,
        children: [
            {
                name:'Registration',
                path: '/Registration',
                component: Registration
            },
            {
                name:'certificate',
                path: '/certificate',
                component: certificate
            },
            {
                name:'Equipment',
                path: '/Equipment',
                component: Equipment,
                children:[
                    {
                        name:'CallDetails',
                        path: '/CallDetails',
                        component: CallDetails
                    },
                    {
                        name:'List',
                        path: '/List',
                        component: List
                    },

                ]
            },
        ]
    },
];

const router = new VueRouter({
    routes:routers
});


export default router
